package com.katsu.myapplib.util;

import android.content.IntentFilter;

public final class UtilClassName {
    private UtilClassName() {}

    public static IntentFilter getIntentFilter(Class<?> cls) {

        return new IntentFilter(getActionName(cls));

    }

    public static String getActionName(Class<?> cls) {

        return "!" + getName(cls);

    }

    public static String getName(Class<?> cls) {

        String[] n = cls.getName().split("\\.");

        return n[n.length - 1];

    }
}
